<!DOCTYPE html>
<html lang="zh-CN">

<head>
	<meta charset="UTF-8" />
	<title>VitaCorex | Vital Care for Core Health</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	<!-- Tailwind CDN -->
	<script src="https://cdn.tailwindcss.com"></script>
	<style>
		.pkg {
			border-color: #D1D5DB;
		}

		.pkg .pkg-bar {
			background: #374151;
		}

		.pkg.active {
			border-color: #DC2626;
			box-shadow: 0 0 0 3px rgba(220, 38, 38, .15);
		}

		.pkg.active .pkg-bar {
			background: #B91C1C;
		}

		.no-scrollbar::-webkit-scrollbar {
			display: none;
		}

		.no-scrollbar {
			-ms-overflow-style: none;
			scrollbar-width: none;
		}

		.checkout-bar {
			position: fixed;
			bottom: 0;
			left: 0;
			width: 100%;
			padding: 16px;
			background: rgba(255, 255, 255, 0.2);
			backdrop-filter: blur(12px);
			-webkit-backdrop-filter: blur(12px);
			box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
			display: flex;
			flex-direction: column;
			align-items: center;
			z-index: 999;
		}

		@keyframes pulse-shake {
			0% {
				transform: scale(1);
			}

			25% {
				transform: scale(1.04);
			}

			50% {
				transform: scale(0.98);
			}

			75% {
				transform: scale(1.02);
			}

			100% {
				transform: scale(1);
			}
		}

		.flash-cycle {
			animation: pulse-shake 0.8s cubic-bezier(0.4, 0, 0.2, 1) 2 !important;
		}

		@keyframes flash-label {

			0%,
			100% {
				opacity: 1;
			}

			50% {
				opacity: 0.2;
			}
		}

		.flash-label {
			animation: flash-label 0.4s ease-in-out 3;
		}

		@keyframes flash-bg {

			0%,
			100% {
				background-color: #facc15;
			}

			50% {
				background-color: #ffff7f;
			}
		}

		.flash-bg {
			animation: flash-bg 0.6s ease-in-out 3;
		}


		.best-value-label {
			background: linear-gradient(135deg, #ff1a1a, #ff751a, #ffd633, #ff1a1a);
			background-size: 300% 300%;
			color: #fff;
			font-weight: bold;
			text-align: center;
			padding: 4px 8px;
			border-radius: 6px;
			box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
			animation: shimmerColors 3s ease-in-out infinite, pulseScale 1.5s ease-in-out infinite;
		}

		/* 🎨 颜色渐变闪烁 */
		@keyframes shimmerColors {
			0% {
				background-position: 0% 50%;
			}

			50% {
				background-position: 100% 50%;
			}

			100% {
				background-position: 0% 50%;
			}
		}

		/* 🔥 轻微抖动缩放 */
		@keyframes pulseScale {
			0% {
				transform: scale(1);
			}

			25% {
				transform: scale(1.05);
			}

			50% {
				transform: scale(0.97);
			}

			75% {
				transform: scale(1.03);
			}

			100% {
				transform: scale(1);
			}
		}
	</style>

	<!-- Google tag (gtag.js) -->
	<script async src="https://www.googletagmanager.com/gtag/js?id=G-Y3S2WRG0RZ"></script>
	<script>
		window.dataLayer = window.dataLayer || [];

		function gtag() {
			dataLayer.push(arguments);
		}
		gtag('js', new Date());

		gtag('config', 'G-Y3S2WRG0RZ');
	</script>

	<!-- Meta Pixel Code -->
	<script>
		!function (f, b, e, v, n, t, s) {
			if (f.fbq) return; n = f.fbq = function () {
				n.callMethod ?
				n.callMethod.apply(n, arguments) : n.queue.push(arguments)
			};
			if (!f._fbq) f._fbq = n; n.push = n; n.loaded = !0; n.version = '2.0';
			n.queue = []; t = b.createElement(e); t.async = !0;
			t.src = v; s = b.getElementsByTagName(e)[0];
			s.parentNode.insertBefore(t, s)
		}(window, document, 'script',
			'https://connect.facebook.net/en_US/fbevents.js');
		fbq('init', '3276195812754997');
		fbq('track', 'PageView');
	</script>
	<noscript>
		< img height="1" width="1" style="display:none"
			src="https://www.facebook.com/tr?id=3276195812754997&ev=PageView&noscript=1" />
	</noscript>
	<!-- End Meta Pixel Code -->
</head>

<body class="bg-gray-100 min-h-screen">
	<div class="pt-2 md:pt-4 px-2 md:px-4 text-left md:text-center">
		<h1 class="text-xl md:text-2xl font-extrabold tracking-tight">
			<span class="text-red-600">BLOOD STABILIZER</span> NORMAL BLOOD SUGAR SUPPORT
		</h1>
	</div>

	<main class="max-w-7xl mx-auto p-2 md:p-6 lg:p-8">
		<div class="grid grid-cols-1 md:grid-cols-2 gap-2">
			<!-- 左列：产品图片展示 -->
			<div>
				<div class="border rounded-2xl overflow-hidden shadow-md bg-white">
					<img id="mainImage" alt="Product image" class="w-full aspect-[5/3] object-contain bg-white" />
				</div>
				<div id="thumbs" class="flex space-x-3 mt-2 overflow-x-auto no-scrollbar">
					<img onclick="changeImage(this)"
						src="https://vcexbuck.us-lax-1.linodeobjects.com/product%2Fag01.jpg"
						class="thumbnail w-16 h-16 object-cover rounded-lg border-2 border-transparent cursor-pointer flex-shrink-0">
					<img onclick="changeImage(this)"
						src="https://vcexbuck.us-lax-1.linodeobjects.com/product%2Fag02.jpg"
						class="thumbnail w-16 h-16 object-cover rounded-lg border-2 border-transparent cursor-pointer flex-shrink-0">
					<img onclick="changeImage(this)"
						src="https://vcexbuck.us-lax-1.linodeobjects.com/product%2Fag03.jpg"
						class="thumbnail w-16 h-16 object-cover rounded-lg border-2 border-transparent cursor-pointer flex-shrink-0">
					<img onclick="changeImage(this)"
						src="https://vcexbuck.us-lax-1.linodeobjects.com/statics/aplus1.jpg"
						class="thumbnail w-16 h-16 object-cover rounded-lg border-2 border-transparent cursor-pointer flex-shrink-0">
					<img onclick="changeImage(this)"
						src="https://vcexbuck.us-lax-1.linodeobjects.com/statics/aplus2.jpg"
						class="thumbnail w-16 h-16 object-cover rounded-lg border-2 border-transparent cursor-pointer flex-shrink-0">
					<img onclick="changeImage(this)"
						src="https://vcexbuck.us-lax-1.linodeobjects.com/statics/aplus3.jpg"
						class="thumbnail w-16 h-16 object-cover rounded-lg border-2 border-transparent cursor-pointer flex-shrink-0">
					<img onclick="changeImage(this)"
						src="https://vcexbuck.us-lax-1.linodeobjects.com/product%2Fag04.jpg"
						class="thumbnail w-16 h-16 object-cover rounded-lg border-2 border-transparent cursor-pointer flex-shrink-0">
					<img onclick="changeImage(this)"
						src="https://vcexbuck.us-lax-1.linodeobjects.com/product%2Fag05.jpg"
						class="thumbnail w-16 h-16 object-cover rounded-lg border-2 border-transparent cursor-pointer flex-shrink-0">
					<img onclick="changeImage(this)"
						src="https://vcexbuck.us-lax-1.linodeobjects.com/product%2Fag06.jpg"
						class="thumbnail w-16 h-16 object-cover rounded-lg border-2 border-transparent cursor-pointer flex-shrink-0">

				</div>
			</div>

			<!-- 右列：套餐选择 -->
			<section class="space-y-2" id="packages">
				<h1 class="font-extrabold tracking-wide text-gray-800 mb-2">SELECT YOUR PACKAGE</h1>
				<div id="pkgList" class="space-y-2"></div>
			</section>
		</div>


		<section id="testimonials" class="max-w-5xl mx-auto mt-4 mb-2 px-1" style="display: none">
			<h2 class="text-xl font-extrabold text-center text-gray-800 mb-2">What Our Customers Say</h2>
			<div id="testimonialList" class="grid gap-1 sm:grid-cols-2 lg:grid-cols-2"></div>
		</section>

		<script>
			const testimonials = [
				{
					img: "https://vcexbuck.us-lax-1.linodeobjects.com/statics/fb01.png",
					title: "More Energy at 74",
					text: "After 6 weeks, my walks grew from 10 to 30 minutes. Blood pressure dropped from 150/92 to 128/80."
				},
				{
					img: "https://vcexbuck.us-lax-1.linodeobjects.com/statics/fb02.png",
					title: "Works for Mom & Me",
					text: "Mom’s glucose fell from 160 to 110 mg/dL. I lost 8 lbs and kept mine stable at 95 mg/dL."
				},
				{
					img: "https://vcexbuck.us-lax-1.linodeobjects.com/statics/fb03.png",
					title: "Doctor Was Impressed",
					text: "Fasting glucose dropped from 130+ to 102 mg/dL. Blood pressure improved from 145/88 to 124/78."
				},
				{
					img: "https://vcexbuck.us-lax-1.linodeobjects.com/statics/fb05.png",
					title: "A1C Down in 2 Months",
					text: "My A1C went from 7.4 to 6.1. I sleep better and have more daily energy."
				},
				{
					img: "https://vcexbuck.us-lax-1.linodeobjects.com/statics/fb06.png",
					title: "Healthy Together",
					text: "Husband’s glucose dropped from 155 to 110 mg/dL. I lost 6 lbs and cholesterol fell from 215 to 185."
				}
			]

			function renderTestimonials() {
				const wrap = document.getElementById("testimonialList")
				wrap.innerHTML = testimonials.map(t => `
			      <div class="bg-white rounded-lg shadow p-3 flex items-start gap-3">
			        <img src="${t.img}" alt="User photo" class="w-12 h-12 rounded-full object-cover flex-shrink-0 shadow-sm">
			        <div class="flex-1">
			          <h3 class="font-bold text-gray-900 text-sm mb-1">${t.title}</h3>
			          <p class="text-xs text-gray-600 leading-snug">${t.text}</p>
			        </div>
			      </div>
			    `).join("")
			}

			// document.addEventListener("DOMContentLoaded", renderTestimonials)
		</script>





		<!-- Guarantee -->
		<section
			class="max-w-3xl mx-auto bg-white rounded-xl shadow-md border border-gray-200 p-2 mt-2 flex items-start gap-2">
			<img src="https://vcexbuck.us-lax-1.linodeobjects.com/statics/guarantee-badge.png"
				alt="60-Day Guarantee Badge" class="w-20 h-20 flex-shrink-0">
			<div>
				<h2 class="text-md font-extrabold text-gray-900 uppercase">YOU'RE PROTECTED BY OUR 60-DAY MONEY BACK
					GUARANTEE!</h2>
				<p class="text-xs text-gray-700 leading-relaxed">If you’re not satisfied within 60 days, just
					email or call us for a full refund—no return needed.</p>
			</div>
		</section>

		<!-- 悬浮 Buy 按钮 -->
		<div id="buyBar"
			class="fixed bottom-0 left-0 w-full border-t shadow-lg px-2 py-3 pb-8 flex flex-col items-center z-50 checkout-bar">
			<!--				<button id="buyButton" class="w-full md:w-auto px-8 py-2 rounded-lg font-bold text-lg-->
			<!--               bg-yellow-400 hover:brightness-105 active:bg-yellow-600-->
			<!--               text-gray-900 shadow-md transition-->
			<!--               flex items-center justify-center gap-3">-->
			<!--					🛒 BUY NOW-->
			<!--					<span id="selectedOption"-->
			<!--						class="text-xs font-semibold bg-red-600 text-white px-2 py-0.5 rounded-md">LOADING...</span>-->
			<!--				</button>-->

			<button id="buyButton" class="w-full md:w-auto px-4 py-2 rounded-lg font-bold text-base md:text-lg
			           bg-yellow-400 hover:brightness-105 active:bg-yellow-600
			           text-gray-900 shadow-md transition
			           flex flex-col md:flex-row items-center justify-center gap-1 md:gap-3">

				<span class="flex items-center gap-1">🛒 BUY NOW, Start Stabilizing Today</span>
				<span id="selectedOption"
					class="text-[11px] md:text-xs font-semibold bg-red-600 text-white px-2 py-0.5 rounded-md">
					LOADING...
				</span>
			</button>
			<div class="flex items-center space-x-3 mt-2 text-xs text-gray-600">
				<span class="flex items-center">🔒 Secure Checkout</span>
				<span class="flex items-center">✔ 60-Day Money Back Guarantee</span>
			</div>
		</div>

		<!-- Supplement Facts -->
		<div class="min-h-screen bg-gray-100 text-gray-900 font-sans mt-2">
			<main class="mx-auto">
				<section class="bg-white rounded-2xl overflow-hidden mb-2">
					<div class="px-4 py-5 bg-gradient-to-b from-red-800 to-red-600 text-white">
						<p class="text-2xl font-extrabold tracking-tight text-white">Supplement Facts</p>
						<p class="mt-1 text-sm text-red-100">Serving Size: <strong>2 Capsules</strong> · Servings
							Per Container: <strong>30</strong>💊</p>
					</div>
					<div>
						<div class="overflow-x-auto">
							<table class="w-full min-w-full overflow-hidden">
								<thead class="bg-gray-100">
									<tr class="text-gray-700 text-sm">
										<th class="py-3 px-4 font-semibold text-left">Nutrient</th>
										<th class="py-3 px-4 font-semibold text-right">Amount Per Serving</th>
										<th class="py-3 px-4 font-semibold text-right">%DV**</th>
									</tr>
								</thead>
								<tbody class="divide-y divide-gray-200 text-sm">
									<tr>
										<td class="py-3 px-4">Vitamin C (as ascorbic acid)</td>
										<td class="py-3 px-4 text-right">100 mg</td>
										<td class="py-3 px-4 text-right">110%</td>
									</tr>
									<tr>
										<td class="py-3 px-4">Vitamin E (as dl-alpha tocopheryl acetate)</td>
										<td class="py-3 px-4 text-right">10 mg</td>
										<td class="py-3 px-4 text-right">70%</td>
									</tr>
									<tr>
										<td class="py-3 px-4">Biotin</td>
										<td class="py-3 px-4 text-right">600 mcg</td>
										<td class="py-3 px-4 text-right">2000%</td>
									</tr>
									<tr>
										<td class="py-3 px-4">Magnesium (as magnesium oxide)</td>
										<td class="py-3 px-4 text-right">23 mg</td>
										<td class="py-3 px-4 text-right">6%</td>
									</tr>
									<tr>
										<td class="py-3 px-4">Zinc (as zinc oxide)</td>
										<td class="py-3 px-4 text-right">7.5 mg</td>
										<td class="py-3 px-4 text-right">70%</td>
									</tr>
									<tr>
										<td class="py-3 px-4">Manganese (as manganese amino acid chelate)</td>
										<td class="py-3 px-4 text-right">1 mg</td>
										<td class="py-3 px-4 text-right">45%</td>
									</tr>
									<tr>
										<td class="py-3 px-4">Chromium (as chromium amino acid chelate)</td>
										<td class="py-3 px-4 text-right">148 mcg</td>
										<td class="py-3 px-4 text-right">420%</td>
									</tr>
								</tbody>
							</table>
						</div>
						<div class="mt-8 px-4">
							<h2 class="font-bold text-lg text-gray-800 flex items-center gap-2">Blood Sugar Blend
								<span class="text-sm font-normal text-gray-600">620 mg</span>
								<span class="text-gray-400 text-sm">***</span>
							</h2>
							<ul class="mt-4 grid sm:grid-cols-2 gap-2 text-[13px] leading-relaxed text-gray-700">
								<li>Bitter Melon Extract (fruit)</li>
								<li>Cinnamon (bark)</li>
								<li>Licorice Extract (root)</li>
								<li>Gymnema sylvestre (leaf)</li>
								<li>Banaba Extract (leaf)</li>
								<li>L-Taurine</li>
								<li>Mulberry Fruit Powder</li>
								<li>Yarrow Herb Powder</li>
								<li>Cayenne Pepper Extract</li>
								<li>Alpha Lipoic Acid</li>
								<li>Juniper Berry Powder</li>
							</ul>
						</div>
						<div class="mt-4 space-y-2 text-xs text-gray-500 px-4">
							<p>** The % Daily Value (DV) tells you how much a nutrient in a serving of food
								contributes to a daily diet. 2,000 calories a day is used for general nutrition
								advice.</p>
							<p>*** Daily Value (DV) not established.</p>
						</div>
						<div class="m-4 p-2 bg-red-50 rounded-xl ring-1 ring-red-200">
							<p class="font-semibold text-gray-800">Other Ingredients</p>
							<p class="text-sm text-gray-700">Gelatin (capsule), Brown Rice Flour.</p>
						</div>
					</div>
				</section>

				<!-- Safety -->
				<section class="bg-gradient-to-b from-red-800 to-red-600 text-white rounded-2xl overflow-hidden">
					<div class="p-5 sm:p-6 lg:p-8 space-y-5 text-[13px] leading-relaxed">
						<div>
							<h3 class="font-extrabold uppercase tracking-wider text-white text-lg">SUGGESTED USE:
							</h3>
							<p class="mt-1">As a dietary supplement, adults take two (2) capsules daily. For best
								results, take with 6–8 oz (177–237ml) of water or as directed by a healthcare
								professional.</p>
						</div>
						<div>
							<h3 class="font-extrabold uppercase tracking-wider text-white text-lg">CAUTION:</h3>
							<p class="mt-1">Do not exceed recommended dose. Pregnant or nursing mothers, children
								under the age of 18, and individuals with a known medical condition should consult a
								physician before using this or any dietary supplement.</p>
						</div>
						<p class="font-extrabold uppercase tracking-wider">KEEP OUT OF REACH OF CHILDREN. DO NOT USE
							IF SAFETY SEAL IS DAMAGED OR MISSING. STORE IN A COOL, DRY PLACE.</p>
						<div class="border-2 border-red-100/80 bg-red-600/30 rounded-xl p-2">
							<p class="font-semibold">* This statement has not been evaluated by the Food and Drug
								Administration. This product is not intended to diagnose, treat, cure or prevent any
								disease.</p>
						</div>
						<div>
							<p>Manufactured for and distributed by: <span class="font-semibold">Kyash Ltd</span></p>
							<p>Address: 1405 S 100th ST SEATTLE, WA 98168 United States</p>
							<p>Tel: (307) 533-2182</p>
						</div>
					</div>
				</section>
			</main>
		</div>
	</main>
	<!-- 🏢 Company Footer -->
	<footer class="mt-8 text-center text-xs text-gray-500 border-t pt-4 mb-10">
		<p>© 2025 LeadMob All rights reserved.</p>
		<p class="mt-1">Your trusted partner in health & wellness.</p>
	</footer>

	<div class="h-28"></div>

	<script>
		// 获取 URL 参数
		const urlParams = new URLSearchParams(window.location.search)
		const sub1 = urlParams.get('sub1')
		const sub2 = urlParams.get('sub2')
		const sub3 = urlParams.get('sub3')
		const sub4 = urlParams.get('sub4')


		// 相册切换
		document.addEventListener('DOMContentLoaded', () => {
			const main = document.getElementById('mainImage');
			const thumbs = Array.from(document.querySelectorAll('#thumbs .thumbnail'));
			if (!main || thumbs.length === 0) return;

			function activate(el) {
				main.src = el.dataset.full || el.src;
				main.alt = el.alt || 'Product image';
				thumbs.forEach(img => img.classList.remove('border-red-600'));
				el.classList.add('border-red-600');
			}
			window.changeImage = activate;
			activate(thumbs[0]);
		});

		// 格式化价格
		function formatPrice(v) {
			if (typeof v === 'number') return '$' + v.toFixed(2);
			if (typeof v === 'string') {
				const t = v.trim();
				return t.startsWith('$') ? t : ('$' + t);
			}
			return '$0.00';
		}

		// 加载套餐列表
		async function loadProducts() {
			try {
				const res = await fetch('https://vitacorex.com/vcex/order/get_product_list?collection_id=2');
				const json = await res.json();
				if (!json || !json.data || !Array.isArray(json.data.list)) {
					throw new Error('接口返回结构错误');
				}
				renderPackages(json.data.list);
			} catch (e) {
				console.error('加载失败，使用兜底数据', e);
				renderPackages([{
					defaultChecked: true,
					name: '',
					sub_title: '',
					description: '',
					main_title: '',
					price: '',
					unit_text: '',
					image_url: '',
					buy_tip: ''
				}]);
			}
		}

		// 渲染套餐
		function renderPackages(packages) {
			const wrap = document.getElementById('pkgList');
			const buyOption = document.getElementById('selectedOption');
			const buyBtn = document.getElementById('buyButton');
			if (!wrap) return;

			wrap.innerHTML = packages.map((p, idx) => {
				const checked = p.is_checked === 1
				return `
				  <label class="block cursor-pointer relative">
				    <input type="radio" name="pkg" class="sr-only pkg-radio" data-idx="${idx}" ${idx === 0 ? "checked" : ""}/>
				    <div class="pkg rounded-lg border-2 bg-white overflow-hidden transition relative">

				      <div class="pkg-bar px-2 py-2 font-bold text-white flex justify-between items-center text-sm">
				        <span>${p.name} <span class="text-yellow-300">${p.sub_title || ""}</span></span>
				        <span class="text-xs flex items-center gap-1">
				          🚚 FREE SHIPPING
				        </span>
				      </div>

				      <div class="p-2 flex items-center gap-2 relative">
				        <img src="${p.image_url}" alt="bottles" class="w-36 object-contain flex-shrink-0 relative">

				        <!-- ✅ 只有第一个套餐加 Best Value 标签 -->
				        ${checked ? `
				       <span class="absolute top-1 right-1
				         bg-gradient-to-r from-red-700 via-red-600 to-red-500
				         text-white text-[10px] px-2 py-1 rounded-md font-extrabold shadow-lg
				         tracking-wide
				         best-value-label">
				         ✨ BEST<br/>VALUE
				       </span>

				        ` : ""}

				        <div class="flex-1">
				          <p class="text-gray-700 text-xs">${p.description}</p>
							<p class="text-[10px] text-gray-400 italic leading-tight">same as</p>
				          <p class="mt-1 text-xl font-extrabold text-red-600 flex items-center gap-1">
				            ${formatPrice(p.price)}
				            <span class="text-xs text-gray-700 font-semibold">${p.unit_text || ""}</span>
				          </p>
				          <p class="line-through text-gray-400 text-xs">${p.main_title}</p>
				        </div>
				      </div>
				    </div>
				  </label>
				`
			}).join('');


			const labels = Array.from(wrap.querySelectorAll('label'));
			const radios = labels.map(lb => lb.querySelector('.pkg-radio'));
			const cards = labels.map(lb => lb.querySelector('.pkg'));

			function setActive(idx) {
				cards.forEach((el, i) => {
					const active = i === idx;
					el.classList.toggle('active', active);
					radios[i].checked = active;
				});
				buyOption.textContent = packages[idx].buy_tip;
				buyOption.classList.remove('flash-label');
				buyBtn.classList.remove('flash-bg');
				void buyOption.offsetWidth;
				buyOption.classList.add('flash-label');
				buyBtn.classList.add('flash-bg');
			}

			// const initIdx = 0;
			// setActive(initIdx);

			let initIdx = packages.findIndex(p => p.is_checked === 1);
			if (initIdx === -1) initIdx = 0;
			setActive(initIdx);

			labels.forEach((lb, idx) => lb.addEventListener('click', () => setActive(idx)));

			// ✅ 修改 buyBtn 点击逻辑
			buyBtn.onclick = () => {
				const checked = wrap.querySelector('input.pkg-radio:checked');
				if (!checked) return alert('Please select a package');
				const idx = parseInt(checked.dataset.idx, 10);
				const selected = packages[idx];

				// ✅ 上报事件到 GA4
				gtag('event', 'buy_now_click', {
					button_id: 'buyButton',
					button_text: 'Buy Now',
					product_id: selected.id,
					product_name: selected.name,
					price: selected.price,
					page_path: location.pathname
				});

				// 跳转时把关键参数带过去
				const params = new URLSearchParams({
					id: selected.id,
					name: selected.name,
					price: selected.price,
					unit_text: selected.unit_text || '',
					image_url: selected.image_url,
					buy_tip: selected.buy_tip
				})

				// 如果有流量方带来的 sub 参数，则附加上
				if (sub1) params.set('sub1', sub1)
				if (sub2) params.set('sub2', sub2)
				if (sub3) params.set('sub3', sub3)
				if (sub4) params.set('sub4', sub4)

				window.location.href = "payment.html?" + params.toString()

			};

			setInterval(() => {
				buyBtn.classList.add('flash-cycle');
				setTimeout(() => buyBtn.classList.remove('flash-cycle'), 3000);
			}, 4000);
		}


		// 页面加载时调用
		loadProducts();
	</script>

</body>

</html>